Skip to content

Return true on trusted_path if path is really trusted. #79

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

Le-onardo
Copy link

If drop_privileges is set to false (default is true), the trusted_path function does check if the path is trusted or not and returns false if this isn't the case. If this conditional path is not hit, there is no return true, which leaves the state of the function 'nil', thus being false.

This change should account for the true case.

@Le-onardo Le-onardo requested a review from a team as a code owner January 22, 2024 10:55
@CLAassistant
Copy link

CLAassistant commented Jan 22, 2024

CLA assistant check
All committers have signed the CLA.

@@ -64,6 +64,7 @@ def trusted_path
path = path.dirname
end
Puppet.debug('Path trusted, writing the file as the current user')
return true
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! There should be a test to verify this behavior. Do you know if one exists already?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants